{	Problem: http://codeforces.ru/problemset/problem/6/C
	Verdict: Accepted
}
uses
        SysUtils, Math;

var
        tx,ty,xx,yy,x,y:int64;
        i,n:longint;
        a:array[0..100010] of longint;
                
begin 
read(n);
x:=0;
y:=0;
for i:=1 to n do
        read(a[i]);
xx:=1;
yy:=n;
tx:=0;
ty:=0;
while n>1 do begin
        if ty<tx then begin
                inc(ty,a[yy]);
                dec(yy);
                inc(y);
                dec(n);
        end else begin
                inc(tx,a[xx]);
                inc(xx);
                inc(x);
                dec(n);
        end;
end;
if tx<=ty then inc(x) else inc(y);
write(x,' ',y);
end.